home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1996 #14 / Monster Media No. 14 (April 1996) (Monster Media, Inc.).ISO / database / convr601.zip / BRUCEINI.DOC < prev    next >
Text File  |  1996-01-20  |  8KB  |  184 lines

  1. BRUCEINI.DOC                         1                         Revised: 01/20/96
  2.  
  3. This text file describes what INI files are and how they are supported  by  this
  4. program and other programs by the same author.  INI files  are  always  optional
  5. but they can be very useful.
  6.  
  7. An INI file is a way of specifying parameters for a program that you don't  want
  8. to have to respecify from the command  line  each  time.   This  allows  you  to
  9. override the program defaults automatically.
  10.  
  11. This is very useful if you disagree with the defaults I've established  for  the
  12. routines.  It is also useful in cases where you typically use  the  command  one
  13. way but in fairly regular cases you need to run the command using a whole  bunch
  14. of different parameters.  You can set up one INI file for  your  standard  usage
  15. and then provide a different INI file when it's time  to  run  the  lesser  used
  16. versions.
  17.  
  18. Each of the programs reads an INI file if it can find one.  By default, the  INI
  19. file that is searched for is based on the executable's name but not always. This
  20. is shown below (block declarations and  environmental  variables  are  described
  21. later):
  22.  
  23.         Routine         INI file        Block           Env variable
  24.  
  25.         AV.EXE          AV.INI          [AV]            AV
  26.         BFIND.EXE       BFIND.INI       [BFIND]         BFIND
  27.         CHANGE.EXE      CHANGE.INI      [CHANGE]        CHANGE
  28.         CONVERT.EXE     CONVERT.INI     [CONVERT]       CONVERT
  29.         COPSINCE.EXE    COPSINCE.INI    [COPSINCE]      COPSINCE
  30.         DATES.EXE       DATES.INI       [DATES]         DATES
  31.         DIRCOMP.EXE     DIRCOMP.INI     [DIRCOMP]       DIRCOMP
  32.         DIRTOTAL.EXE    DIRTOTAL.INI    [DIRTOTAL]      DIRTOTAL
  33.         FILL.EXE        FILL.INI        [FILL]          FILL
  34.         FILUPDAT.EXE    FILUPDAT.INI    [FILUPDAT]      FILUPDAT
  35.         FIXTEXT.EXE     FIXTEXT.INI     [FIXTEXT]       FIXTEXT
  36.         FORTUNE.EXE     FORTUNE.INI     [FORTUNE]       FORTUNE
  37.         HTMSTRIP.EXE    HTMSTRIP.INI    [HTMSTRIP]      HTMSTRIP
  38.         ISAMFIND.EXE &
  39.           ISAMMAKE.EXE  ISAMFIND.INI    [ISAMFIND]      ISAMFIND
  40.         PAGINATE.EXE    PAGINATE.INI    [PAGINATE]      PAGINATE
  41.         READ.EXE &
  42.           READINIT.EXE &
  43.           READMAKE.EXE &
  44.           READY.EXE     READ.INI        [READ]          READ
  45.         TXTABLE.EXE     TXTABLE.INI     [TXTABLE]       TXTABLE
  46.  
  47. The INI file is an ASCII text file that can be created maintained by hand.   The
  48. commands in the INI file should begin in column 1.  It can consist of:
  49.  
  50.   (a) Command-line parameters
  51.   (b) Comments
  52.   (c) Block declarations
  53.   (d) Special items (vary by routine)
  54.  
  55.  
  56. BRUCEINI.DOC                         2                         Revised: 01/20/96
  57.  
  58. (a)  Command-line parameters:  The INI file can consist or one or  more  command
  59.      line parameters.  In  most  cases,  it  can  *only*  include  command  line
  60.      parameters that begin with a slash ("/").  These will vary  by  routine  of
  61.      course but, in READ for example, your INI file might appear like this:
  62.  
  63.         /MONO
  64.         /-DOS
  65.         /COLOR=123 134 145 156
  66.  
  67. (b)  Comments: The INI file can also contain comment lines.  These  are  defined
  68.      as any lines that  are  either  blank  or  contain  any  of  the  following
  69.      characters in column 1:
  70.  
  71.         (space) (any line that is indented is a comment)
  72.         ;       (semi-colon)
  73.         :       (colon)
  74.         '       (quote)
  75.  
  76. (c)  Block declarations:  You can combine INI files if you'd like.   This  saves
  77.      some disk space.  Typically, this  is  done  in  connection  with  the  SET
  78.      BG=inifile environmental parameter (described below).  Blocks are  declared
  79.      by using the name of searched-for routine  in  brackets.   (See  the  table
  80.      above to  see  what  blocks  are  searched  for  for  each  routine.)   Any
  81.      statements between one block and the next are assumed to be associated with
  82.      the first routine.  For example:
  83.  
  84.         ; ALL.INI -- contains all of the INI statements
  85.         [DATES]
  86.         /SORT
  87.         [FILL]
  88.         /ON
  89.         /SPLIT
  90.         [READ]
  91.         /MONO
  92.  
  93. (d)  Special items:  Some routines allow the INI file to include statements that
  94.      cannot be specified from the command line.  These  special  statements  are
  95.      described in the specific routine's documentation.
  96.  
  97.  
  98. BRUCEINI.DOC                         3                         Revised: 01/20/96
  99.  
  100. Where does each program look for the INI file?
  101.  
  102. Each program here looks for an INI file unless instructed otherwise.  The  logic
  103. used is as follows.  Note that the first "hit" wins:
  104.  
  105. (a)  No INI file is checked for if any of the following is true:
  106.       - /-I or /INULL is passed in from the command line
  107.       - /-I or /INULL is passed in from the routine's environmental parameter
  108.            (e.g. SET READ=/-I)
  109.       - the environmental variable BG is set to the value of /-I or /INULL
  110.            (e.g. SET BG=/-I)
  111.      Most programs accept either  /-I  or  /INULL.   However,  several  routines
  112.      (BFIND and CHANGE) accept /-I to mean do a  case-insensitive  search.   For
  113.      these programs, you *have* to use /INULL instead.
  114.  
  115. (b)  If a /Iinitfile setting is passed in, the routine uses  this  to  determine
  116.      the name of the INI file to look for.  Note that the file name must include
  117.      a period (e.g. "/ICHANGE.INI") or the program will skip it.
  118.  
  119. (c)  The routine looks for an environmental variable BG.  If  this  variable  is
  120.      defined (and it's not set to /-I), then the routine takes this  to  be  the
  121.      name of the INI file to look for.
  122.  
  123. (d)  The routine looks for the INI file under the "INI file" name shown  in  the
  124.      table at the start of this documentation.
  125.  
  126. If the INI file name does not include  either  a  drive  or  path  specification
  127. (e.g., you don't pass in something like /IC:\ALL.INI), the routine  will  search
  128. for the named file.  It will check  for  it  in  the  following  places  in  the
  129. following order.  The first place that it finds it wins:
  130.  
  131.   - Your default subdirectory (where you were when you executed the command)
  132.   - The subdirectory that contains the EXE that you're executing
  133.   - Your regular DOS path
  134.  
  135. If you do not have an INI file, this searching can take awhile especially if you
  136. have any networked drives in your path.  In this  case,  specifying  "/-I"  will
  137. save some time.  Passing in a fully qualified filename also helps.
  138.  
  139.  
  140. BRUCEINI.DOC                         4                         Revised: 01/20/96
  141.  
  142. Personally, I have a common INI file named WAYNE.INI in the root of my C: drive.
  143. I put it there so I don't run out of environmental space by specifying some huge
  144. path.  I have the following statement in my AUTOEXEC.BAT:
  145.  
  146.      SET BG=C:\WAYNE.INI
  147.  
  148. Currently, my C:\WAYNE.INI file looks like this:
  149.  
  150.      [AV]
  151.      /on
  152.      [bfind]
  153.      /-empty
  154.      [COPSINCE]
  155.      /def text=*.bas *.bi *.c *.diz *.doc *.h *.ref *.sas *.sc *.txt
  156.      /def prg=*.bas *.bat *.bi *.c *.h *.sas
  157.      /to c:\temp
  158.      /replace
  159.      /-beep
  160.      /text
  161.      /copy -0
  162.      [DATES]
  163.      /cc:\mine\datemine.txt
  164.      /sort
  165.      /day
  166.      /-i
  167.      [FILL]
  168.      /letter
  169.      [htmstrip]
  170.      /lc:\vbdos\htmstrip.ini
  171.      /-symbols
  172.      /warnings
  173.      [paginate]
  174.      /overwrite
  175.      /cc:\bat\brucedoc.ctl
  176.      [txtable]
  177.      /debug
  178.  
  179. If I ever need to override the WAYNE.INI settings, it's easy to  do  by  passing
  180. them in from the command line or by specifying /-I from the command line.
  181.  
  182.  
  183. 
  184.